package xdu.lz.stage1_basic.chapter1_threadsafe.threadSafe;

public class TicketTask implements Runnable {
    public static int totalCount = 50;

    public void run() {
        while (totalCount>0){
            System.out.println(Thread.currentThread().getName()+"卖出了第"+(totalCount)+"张票");
            try {
                Thread.sleep(100L);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            totalCount --;
        }
    }
}
